package permission

import (
	"github.com/ifnk/micro-blog/internal/pkg/dbcontext"
	"github.com/ifnk/micro-blog/internal/pkg/log"
	"github.com/ifnk/micro-blog/protobuf/permission_pb"
)

func NewApiServer(logger *log.Logger, db *dbcontext.GormDB, jinzhuDB *dbcontext.JinZhuDB) ApiServer {
	return ApiServer{
		logger:                  logger,
		db:                      db,
		ApiServiceDefaultServer: permission_pb.ApiServiceDefaultServer{DB: jinzhuDB.DB},
	}
}

type ApiServer struct {
	permission_pb.ApiServiceDefaultServer
	logger *log.Logger
	db     *dbcontext.GormDB
}
